<template>
	<view>
		<view class="card notice-box">
			<view class="tit">最新公告</view>
			<view class="text" @click="handleDetail">{{list.title || '公告内容'}}</view>
		</view>
		<star-notice ref="notiveRef" :show="noneShow" @success="noneShow = false"></star-notice>
	</view>
</template>

<script>
	import {annOun,annOunSee} from '@/api/index.js'
	export default {
		data() {
			return {
				list:{},
				noneShow:false
			};
		},
		mounted() {

		},
		methods: {
			async handleDetail(){
				let res = await annOunSee({id:this.list.id})
				let obj = res.data
				this.noneShow = true
				this.$refs.notiveRef.setNone(obj)
			},
			async getData(){
				let res = await annOun()
				this.list = res.data
			}
		}
	};
</script>

<style scoped>
	.notice-box {
		padding: 20rpx;
	}

	.tit {
		font-weight: bold;
		font-size: 32rpx;
		color: #e2e8f0;
	}

	.text {
		margin-top: 10rpx;
		font-size: 28rpx;
		color: #60a5fa;
	}
</style>